<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<meta name="viewport" content="width=1000, initial-scale=1.0, maximum-scale=1.0">
	    <!-- Loading Bootstrap -->
	    <link href="./Public/Admin/Flat/dist/css/vendor/bootstrap.min.css" rel="stylesheet">
	    <!-- Loading Flat UI -->
	    <link href="./Public/Admin/Flat/dist/css/flat-ui.css" rel="stylesheet">
	    <link rel="shortcut icon" href="./Public/Admin/Flat/img/favicon.ico">
	</head>
	<body>
		<h4>货品列表</h4>
		<div class="table-responsive">
		  <table class="table table-bordered">
		  	<thead>
		  		<tr>
			    	<th>货品ID</th>
			    	{{foreach from="$typeDB" value="$v"}}
			    		<th>{{$v['taname']}}</th>
			    	{{endforeach}}
			    	<!--<th>规格:颜色</th>
			    	<th>规格:尺寸</th>-->
			    	<th>库存</th>
			    	<th>货号</th>
			    	<th>操作</th>
			    </tr>
		  	</thead>
		    <tbody>
		    	{{foreach from="$listsData" value="$v"}}
		    	<tr>
		    		<td>{{$v['glid']}}</td>
		    		{{foreach from="$v['combine']" value="$gtv"}}
		    		<td>{{$gtv}}</td>
		    		{{endforeach}}
		    		<td>{{$v['inventory']}}</td>
		    		<td>{{$v['number']}}</td>
		    		
		    		<td>
		    			<a href="" class="btn btn-info">修改</a>
		    			<a href="JavaScript:if(confirm('确定删除?')) location.href='{{U('Shoplist/del',array('gid'=>$v['gid']))}}';" class="btn btn-danger">删除</a>
		    		</td>
		    	</tr>
		    	{{endforeach}}
		    	<!--添加表单-->
		    	<tr>
		    		<form action="" method="post">
		    		<td>添加货品</td>
		    		{{foreach from="$typeDB" value="$v"}}
			    		<td>
			    			<select name="spec[]">
								<option value="0">-请选择-</option>
								{{foreach from="$v['tavalue']" value="$vv"}}
									<option value="{{$vv['gtid']}}">{{$vv['gtvalue']}}</option>
								{{endforeach}}
							</select>
			    		</td>
			    	{{endforeach}}
			    	<td><input type="text" name="inventory"></td>
			    	<td><input type="text" name="number"><input type="hidden" name="gid" value="{{Q('get.gid')}}"></td>
			    	<td><input type="submit" value="保存添加"></td>
			    	</form>
		    	</tr>
		    </tbody>
		  </table>
		</div>
	</body>
</html>
